package org.jeecg.common.util.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;

/**
 * @author guoyh
 * @ClassName OrderTypeEnum
 * @Description
 * @since 2020/8/26 22:43
 **/
@Getter
@AllArgsConstructor
public enum RegisterEnum {

    PAY(0,"待支付"),
    OPERATE(1,"待处理（已支付）"),
    SUCCESS(2,"挂号成功"),
    FAIL(3,"挂号失败"),
    REFOUD(4,"取消预约"),
    REFOUDING(6,"退款中");

    private int code;

    private String desc;


    public static RegisterEnum getInstance(Integer code){
        return Arrays.stream(values()).filter(item -> Objects.equals(code,item.getCode())).findFirst().orElse(null);
    }

}
